local assets =
{
    Asset("ANIM", "anim/sw_magma_essence.zip"),
}

local prefabs =
{
    "firesplash_fx",
}

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("sw_magma_essence")
    inst.AnimState:SetBuild("sw_magma_essence")
    inst.AnimState:PlayAnimation("idle")

    MakeInventoryFloatable(inst, "small", 0.15, 0.5)

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("inspectable")

    inst:AddComponent("sw_freshen")
    inst.components.sw_freshen.percent_increase = 40

    inst:AddComponent("inventoryitem")

    inst:AddComponent("stackable")

    MakeHauntableLaunch(inst)

    return inst
end

return Prefab("sw_magma_essence", fn, assets, prefabs)
